import React, { memo, useEffect } from "react";
import { useSelector, shallowEqual, useDispatch } from "react-redux";
import RechTitle from '../../components/RechTitle'
import { getDetailsAction } from '../home/store/actionCreators'
export default memo(function App() {
    const { details } = useSelector(
        (state) => ({
            details: state.getIn(["home", "details"]),
        }),
        shallowEqual
    );
    const dispatch = useDispatch();
    useEffect(() => {
        dispatch(getDetailsAction());
    }, [dispatch]);
    return (
        <div className='w ptb60'>
            <div >
                <RechTitle bottom='35px' alignItems='center' flexDirection='column' title='奖项介绍' isImgOrVideo={details.contestFileId} content={details.contestText} videoUrl={details.contestVideoUrl ? details.contestVideoUrl : ''}></RechTitle>
            </div>
        </div>
    );
});
